<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="../../libs/font-awesome.min.css">
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      body {
        min-height: 100vh;
        background: #000;
        overflow: hidden;
      }
      span {
        position: absolute;
        pointer-events: none;
        filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
      }
      span::before {
        content: '\f005';
        position: absolute;
        font-family: fontAwesome;
        font-weight: 900;
        color: #1ceb6b;
        animation: moveShape 1s linear forwards;
      }
      @keyframes moveShape {
        0% {
          transform: translate(0) rotate(0deg);
        }
        20%,
        80% {
          opacity: 1;
        }
        100% {
          transform: translate(300px) rotate(360deg);
        }
      }
    </style>

    <link rel="icon" type="image/x-icon" href="../../../favicon.ico" />
</head>
  <body>
    <script>
      document.addEventListener('mousemove', function (e) {
        let body = document.querySelector('body')
        let star = document.createElement('span')

        let size = Math.random() * 20
        let transformValue = Math.random() * 360

        star.style.left = e.pageX + 'px'
        star.style.top = e.pageY + 'px'
        star.style.fontSize = 10 + size + 'px'
        star.style.transform = 'rotate(' + transformValue + 'deg)'

        body.appendChild(star)

        setTimeout(function () {
          star.remove()
        }, 1000)
      })
    </script>
  </body>
</html>
